package com.qa.IDao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.qa.pojo.Demand;
import com.qa.pojo.ZNode;
import com.qa.pojo.weekplan;
import com.qa.pojo.weekplanStatistics;

public interface weekplanMapper {
	int deleteByPrimaryKey(Integer weekplanid);

	int insert(weekplan record);

	int insertSelective(weekplan record);

	weekplan selectByPrimaryKey(Integer weekplanid);

	int updateByPrimaryKeySelective(weekplan record);

	int updateByPrimaryKey(weekplan record);

	int selectWeekNumIsExist(@Param("weeknum") int weeknum,
			@Param("usersid") int usersid);

	int insertWeekPlan(List<weekplan> weekplansList);

	List<ZNode> selectDeptOrTeam(@Param("usersid") int usersid);

	List<weekplanStatistics> selectWeekPlanStatistics(
			@Param("isSelf") int isSelf, @Param("usersid") int usersid,
			@Param("isDeptOrTeam") int isDeptOrTeam,
			@Param("beginweeknum") int beginweeknum,
			@Param("endweeknum") int endweeknum,
			@Param("trueGroup") List<Integer> trueGroup,
			@Param("selectPerson") int selectPerson,
			@Param("beginYear") int beginYear, @Param("endYear") int endYear);

	List<weekplan> getEditWeekPlan(@Param("weeknum") int weeknum,
			@Param("publish") int publish, @Param("thisYear") int thisYear);

	int deleteExistWeek(@Param("weeknum") int weeknum,
			@Param("currenteditUsersid") int currenteditUsersid);

	List<Demand> selectDemand(@Param("beginTime") String beginTime,
			@Param("endTime") String endTime, @Param("isGuoQi") int isGuoQi,
			@Param("statusFordemand") int statusFordemand);

	int insertDemand(@Param("beginTimeadd") String beginTimeadd,
			@Param("endTimeadd") String endTimeadd,
			@Param("demandContent") String demandContent,
			@Param("statusFordemandadd") int statusFordemandadd);

	int editDemand(@Param("beginTimeadd") String beginTimeadd,
			@Param("endTimeadd") String endTimeadd,
			@Param("demandContent") String demandContent,
			@Param("statusFordemandadd") int statusFordemandadd,
			@Param("id") int id);
}